Skip to content

database/sql: default to current time if scheduled_at unspecified - #504

Merged
bgentry merged 2 commits into
masterfrom
bg-test-for-insert-many-tx-scheduled-at-default-value
Aug 6, 2024
Merged

bgentry merged 2 commits into
masterfrom
bg-test-for-insert-many-tx-scheduled-at-default-value

Conversation

@bgentry

@bgentry bgentry commented Aug 5, 2024

Copy link
Copy Markdown
Contributor

The database/sql driver had a slightly different behavior than the pgx driver in that it was setting the scheduled_at time to null, rather than setting the current timestamp if one was not specified.

Additionally, the driver test suite did not cover this case at all.

Fix both of these issues. Fixes #502.

@bgentry
bgentry force-pushed the bg-test-for-insert-many-tx-scheduled-at-default-value branch from 9911e85 to efeeebc Compare August 5, 2024 21:02
@bgentry
bgentry requested a review from brandur August 5, 2024 21:02
@bgentry
bgentry force-pushed the bg-test-for-insert-many-tx-scheduled-at-default-value branch from efeeebc to aaf8a18 Compare August 5, 2024 21:02
bgentry added 2 commits August 5, 2024 16:08
The database/sql driver had a slightly different behavior than the pgx
driver in that it was setting the `scheduled_at` time to `null`, rather
than setting the current timestamp if one was not specified.

Additionally, the driver test suite did not cover this case at all.

Fix both of these issues. Fixes #502.
@bgentry
bgentry force-pushed the bg-test-for-insert-many-tx-scheduled-at-default-value branch from aaf8a18 to 2d410d4 Compare August 5, 2024 21:08
@bgentry
bgentry merged commit 410482a into master Aug 6, 2024
@bgentry
bgentry deleted the bg-test-for-insert-many-tx-scheduled-at-default-value branch August 6, 2024 00:32
brandur added a commit that referenced this pull request Aug 6, 2024
Prepare release v0.11.1 containing #504 and #505. This will also require
a CLI release.
@brandur brandur mentioned this pull request Aug 6, 2024
brandur added a commit that referenced this pull request Aug 6, 2024
Prepare release v0.11.1 containing #504 and #505. This will also require
a CLI release.
brandur added a commit that referenced this pull request Aug 9, 2024
Prepare release v0.11.2, containing #504 and #505. This will also
require a separate CLI release because of some minimum Go version
changes in all the project's `go.mod` files.
@brandur brandur mentioned this pull request Aug 9, 2024
brandur added a commit that referenced this pull request Aug 9, 2024
Prepare release v0.11.2, containing #504 and #505. This will also
require a separate CLI release because of some minimum Go version
changes in all the project's `go.mod` files.
brandur added a commit that referenced this pull request Aug 9, 2024
Prepare release v0.11.2, containing #504 and #505. This will also
require a separate CLI release because of some minimum Go version
changes in all the project's `go.mod` files.
tigrato pushed a commit to gravitational/river that referenced this pull request Dec 18, 2024
Prepare release v0.11.2, containing riverqueue#504 and riverqueue#505. This will also
require a separate CLI release because of some minimum Go version
changes in all the project's `go.mod` files.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

InsertManyTx and scheduled_at

2 participants